﻿using MySql.Data.MySqlClient;
using WFC.DAL.Interfaces.StatementSources;

namespace WFC.DAL.StatementSources
{
    public abstract class StatementSourceBase : IStatementSource
    {

        #region IStatementSource Members

        public MySqlCommand Command { get; private set; }

        public string Sql
        {
            get { return Command.CommandText; }
            set { Command.CommandText = value; }
        }

        public MySqlParameterCollection Parameters
        {
            get { return Command.Parameters; }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Default constructor
        /// </summary>
        protected StatementSourceBase()
        {
            Command = new MySqlCommand();
        }

        #endregion

    }
}
